package main.Q1801_1900;

import java.util.Arrays;

public class Q1871_1880 {
    public static void main(String[] args) {
        System.out.println("Question1871：");
        System.out.println("Question1872：");
        System.out.println("Question1873：");
        System.out.println("Question1874：");
        System.out.println("Question1875：");
        System.out.println("Question1876：");
        System.out.println("Question1877：数组中最大数对和的最小值");
        System.out.println("Question1878：");
        System.out.println("Question1879：");
        System.out.println("Question1880：");
    }
}

class Question1877 {
    public int minPairSum(int[] nums) {
        Arrays.sort(nums);
        int max = Integer.MIN_VALUE;
        for (int i = 0; i < nums.length / 2; i++) {
            int temp = nums[i] + nums[nums.length - 1 - i];
            max = Math.max(max, temp);
        }
        return max;
    }
}